<?php

namespace app\common\validate\tysj;

class Image extends Base
{
	/**
     * 验证规则
     */
    protected $rule = [
        'id'     => 'integer|isUser:tysj\\Image',
        'uid'    => 'require',
    	'url'    => 'require|max:100'
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.integer'        => '图片ID不合法', 
        'id.isUser'         => '图片不属于您',
    	'uid.require'       => '用户ID不能为空',
        'url.require'       => '图片url不能为空',
        'url.max'           => '图片地址不能超过100个字符'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'nexus'   => ['id'],
        'private' => ['uid']
    ];
}